package com.woniuxy.controller;


import com.woniuxy.commons.utile.Result;
import com.woniuxy.dao.model.RepairProject;
import com.woniuxy.service.RepairProjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Keep it simple
 * @since 2022-06-28
 */
@RestController
@Api(tags = "维修类型接口")
public class RepairProjectController {

    @Resource
    RepairProjectService repairProjectService;

    /**获取全部维修类型
     *
     * @return List<RepairProject>
     */

    @ApiOperation("获取全部维修类型")
    @GetMapping("/getAllType")
    public Result getAllType(){
        List<RepairProject> list = repairProjectService.list();
        return Result.instance().setData(list);
    }
}

